package com.myframe.www;


import android.content.Context;
import android.support.multidex.MultiDexApplication;

import com.myframe.www.net.HttpHandler;
import com.yong.android.framework.utils.log.SLog;

public class MyApplication extends MultiDexApplication {
    private boolean isDebug=true;
    private static Context mAppContext = null;

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
    }

    @Override
    public void onCreate() {
        super.onCreate();
        mAppContext = this.getApplicationContext();
        initLog();
        HttpHandler.initialize(this);
    }
    private void initLog() {
        //初始化log
        //如果是release版本则关闭日志
        if(!isDebug){
            SLog.init(false);
        }
    }

    public static Context getAppContext() {
        return mAppContext;
    }

}
